<template>
  <div>
    <div class="my-body">
      <el-row>
        <el-col :span="24">
          <div class="my-table-search">
            <el-form ref="form" :model="form">
              <el-row :gutter="10">
                <el-col :span="3">
                  <el-input v-model="input" placeholder="请输入内容" />
                </el-col>
                <el-col :span="3">
                  <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value"
                  >
                  </el-option>
                </el-col>
                <el-col :span="7">
                  <el-button type="primary" plain>查询</el-button>
                  <el-button type="primary" plain>清空</el-button>
                </el-col>
              </el-row>
            </el-form>
          </div>
        </el-col>
      </el-row>

      <div>
        <div style="margin-top: 30px">
          <el-table
            :data="
              tableData.slice(
                (currentPage - 1) * pageSize,
                currentPage * pageSize
              )
            "
            border
            style="width: 100%"
           :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
           
          >
            <el-table-column fixed prop="bianhao" label="授权编号" width="150"  class="tabs-custom-bg">
            </el-table-column>
            <el-table-column prop="senddate" label="起始日期" width="120">
            </el-table-column>
            <el-table-column prop="enddate" label="终止日期" width="120">
            </el-table-column>
            <el-table-column prop="name" label="授权产品" width="120">
            </el-table-column>
            <el-table-column prop="province" label="授权状态" width="120">
            </el-table-column>
            <el-table-column prop="address" label="授权医院或地区" width="200">
            </el-table-column>
            <el-table-column prop="shouqfang" label="授权方" width="200">
            </el-table-column>
            <el-table-column prop="jingxiaos" label="经销商" width="200">
            </el-table-column>
            <el-table-column prop="peisonf" label="配送方" width="200">
            </el-table-column>
            <el-table-column prop="shouqyy" label="授权原因" width="120">
            </el-table-column>
            <el-table-column prop="zip" label="其他授权原因" width="120">
            </el-table-column>
            <el-table-column
              prop="shangcaizhibiao"
              label="商采指标"
              width="120"
            >
            </el-table-column>
            <el-table-column fixed="right" label="授权证书" width="100">
              <template slot-scope="scope">
                <!-- <el-button @click="handleClick(scope.row)" type="text" size="small">查看</el-button> -->
                <el-button
                  size="mini"
                  @click="handleEdit(scope.$index, scope.row)"
                  >下载</el-button
                >
              </template>
            </el-table-column>
          </el-table>
          <el-pagination
            @size-change="handleSizeChange"
            @current-change="handleCurrentChange"
            :current-page="currentPage"
            :page-sizes="[5, 10]"
            :page-size="pageSize"
            :total="tableData.length"
            layout="total, sizes, prev, pager, next, jumper"
          >
          </el-pagination>
        </div>
      </div>
    </div>
    <div class="my-body_left">
      <el-row>
        <el-col>
          <div>
            <div style="font-weight: 600; padding: 0 0 10px 0">
              授权方资质(鹰潭市方园医药有限公司)
            </div>
            <el-table
              :data="
                tableData.slice(
                  (currentPage - 1) * pageSize,
                  currentPage * pageSize
                )
              "
              border
              :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
              style="width: 100%"
            >
              <el-table-column fixed prop="bianhao" label="授权编号">
              </el-table-column>
              <el-table-column prop="senddate" label="起始日期">
              </el-table-column>
            </el-table>
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[5, 10]"
              :page-size="pageSize"
              :total="tableData.length"
              layout="total, sizes, prev, pager, next, jumper"
            >
            </el-pagination>
          </div>
        </el-col>
      </el-row>
    </div>
    <div class="my-body_left">
      <el-row>
        <el-col>
          <div>
            <div style="font-weight: 600; padding: 0 0 10px 0">
              经销商资质(鹰潭市方园医药有限公司)
            </div>
            <el-table
              :data="
                tableData.slice(
                  (currentPage - 1) * pageSize,
                  currentPage * pageSize
                )
              "
              border
              style="width: 100%"
              :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
            >
              <el-table-column fixed prop="bianhao" label="授权编号">
              </el-table-column>
              <el-table-column prop="senddate" label="起始日期">
              </el-table-column>
            </el-table>
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[5, 10]"
              :page-size="pageSize"
              :total="tableData.length"
              layout="total, sizes, prev, pager, next, jumper"
            >
            </el-pagination>
          </div>
        </el-col>
      </el-row>
    </div>
    <div class="my-body_left">
      <el-row>
        <el-col>
          <div>
            <div style="font-weight: 600; padding: 0 0 10px 0">
              配送方资质(鹰潭市方园医药有限公司)
            </div>
            <el-table
              :data="
                tableData.slice(
                  (currentPage - 1) * pageSize,
                  currentPage * pageSize
                )
              "
              border
              :header-cell-style="{background:'#f5f7fa',color:'#606266'}"
              style="width: 100%"
            >
              <el-table-column fixed prop="bianhao" label="授权编号">
              </el-table-column>
              <el-table-column prop="senddate" label="起始日期">
              </el-table-column>
            </el-table>
            <el-pagination
              @size-change="handleSizeChange"
              @current-change="handleCurrentChange"
              :current-page="currentPage"
              :page-sizes="[5, 10]"
              :page-size="pageSize"
              :total="tableData.length"
              layout="total, sizes, prev, pager, next, jumper"
            >
            </el-pagination>
          </div>
        </el-col>
      </el-row>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      input:"",
      form:{},
      key: 1, // 为了能每次切换权限的时候重新初始化指令
      options: [
        {
          value: "1",
          label: "全部授权",
        },
        {
          value: "2",
          label: "授权作废",
        },
        {
          value: "3",
          label: "完成授权",
        },
      ],
      value: "",
      currentPage: 1,
      pageSize: 5,
      tableData: [
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
        {
          bianhao: "PS074107742412L",
          senddate: "2024-05-02",
          enddate: "2024-12-31",
          name: "左心耳",
          province: "完成授权",
          city: "普陀区",
          address: "苏州市中心医院",
          shouqfang: "鹰潭市方园医药有限公司",
          jingxiaos: "鹰潭市方园医药有限公司",
          peisonf: "鹰潭市方园医药有限公司",
          shouqyy: "入院",
          shangcaizhibiao: 3,
        },
      ],
    };
  },
  methods: {
    handleClick(row) {
      console.log(row);
    },
    handleSizeChange(val) {
      this.pageSize = val;
    },
    handleCurrentChange(val) {
      this.currentPage = val;
    },
  },
};
</script>

<style lang="scss" scoped>
.ipt_a {
  width: 300px;
  height: 50px;
  float: left;
}
.el-table th {
  background-color: #f0f0f0; /* 你想要的背景颜色 */
}
</style>